Skip to main content

All Questions

3votes
1answer
89views

Check which sinks are connected in the pipe system using Python

It would be very helpful to me as a beginner if I could get feedback on my code, specifically about the efficiency of algorithm used and potential improvements in code quality. Code context: There is ...
Silah's user avatar
0votes
1answer
52views

Aggregate transactions in slips

I wrote code to aggregate transactions in slips. I'm concerned with the performance of my code because it uses 3 loops that are nested so the time complexity will be cubic. This code won't scale well ...
bit's user avatar
  • 143
1vote
1answer
212views

Large file log parser with less memory footprint

This is a variation of an interesting problem I am currently dealing with. We have a large input file which is being continuously written (size: 10-20G). We need to write a log filter which reads ...
Rohith Uppala's user avatar
1vote
1answer
347views

Virtual memory manager in C

Virtual Memory manager that has functions, mappage, unmappage, remappage If the physical ...
runningupthatroad's user avatar
1vote
2answers
147views

"Frequency Counter Pattern", Can we get other better algorithm having like, O(n) or O(n log n)

Problem Statement : Write a function called matchSquare, which accept two arrays (arr1, arr2) Criteria: The function should return true, if every value in the arr1, has its corresponding values ...
RONE's user avatar
  • 131
1vote
1answer
90views

An algorithm that minimizes the number of ingredients necessary

I am working on a code that will minimize the number of ingredients necessary to make some dishes. Each dish can be prepared in an arbitrary large number of ways, with combinations of two ingredients. ...
adrienlucca.net's user avatar
4votes
1answer
340views

Golang function that reads S3 files and populates maps with strings as keys

I have a below read function which is called by multiple go routines to read s3 files and it populates two concurrent map as ...
AndyP's user avatar
4votes
1answer
230views

Segmented Sieve of Eratosthenes with wheel factorisation

Problem I have a project in which I implemented variants of the Sieve of Eratosthenes as well as benchmarking and profiling harnesses for these (which can be ran with ...
nicoty's user avatar
2votes
1answer
928views

Alpha beta pruning with memorization (transposition tables) and bitboards (5x5 cumulative tic-tac-toe)

This is my first time trying solve a game using these techniques. I've looked at pseudocode of alpha-beta pruning with transposition tables and rewritten it in c++. ...
Vepir's user avatar
3votes
0answers
196views

Memcpy function optimzation

Here is my memcpy algorithm I've been working on: ...
Salmoncatt's user avatar
0votes
1answer
75views

Find a sum using just two different digits

The problem statement was pretty easy and I was able to run half of the test cases, but some of the test cases in the end gave me the error of memory limit reached. What can I do here to improve the ...
Martin's user avatar
10votes
3answers
2kviews

Compression Library for C using Huffman Coding

This is an update to a question I posed nearly two years ago about my implementation of Huffman Coding which I had written in C. Since then I have had time to grow as a programmer and have managed to ...
jess's user avatar
  • 1,378
3votes
2answers
4kviews

Hackerrank problem: Climbing the Leaderboard (Java)

I am solving the following Hackerrank problem: Climbing the Leaderboard. The problem statement: Alice is playing an arcade game and wants to climb to the top of the leaderboard and wants to track her ...
Mughees Asif's user avatar
1vote
1answer
164views

Find number of unique paths to reach opposite grid corner

I have m x n grid. m >= 1 ; n >= 1 I have item in the top-left corner and need to reach bottom-right corner of the grid. Item can only move either down or right. I need to find possible unique ...
Artiom Kozyrev's user avatar
0votes
2answers
302views

TrainSet Practice Problem from CodeChef

A dataset consisting of N items. Each item is a pair of a word and a boolean denoting whether the given word is a spam word or not. There shouldn't be a word included in the training set that's ...
shaik moeed's user avatar

153050per page
close